	ORG $0000
RESULT	FCB $00
N	FCB $14

	ORG $F000

FIB	TSY
	LDAA 2,Y
	CMPA #0
	BEQ BASE
	DECA
	PSHA
	JSR FIB
	TSY
	LDAA 0,Y
	LDAB 3,Y
	ABA
	STAA 3,Y
	PULA
RECURSE	RTS
BASE	LDAB #1
	STAB 2,Y
	BRA RECURSE	

	ORG $C000
	LDAA N
	PSHA
	JSR FIB
	TSY
	LDAB 0,Y
	STAB RESULT
LOOP	NOP
	BRA LOOP
